package com.ruoyi.controller;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.domain.Course;
import com.ruoyi.service.CourseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/course/course")
public class CourseController {

    @Autowired
    private CourseService courseService;

    @PostMapping("/add")
    public AjaxResult add(@RequestBody Course courses) {
        return AjaxResult.success(courseService.insertCourse(courses));
    }
}